home *** CD-ROM | disk | FTP | other *** search
- <WIZSET AttributesWithoutDN = ''>
-
- <WIZLOOP index="AttrName" list="$${Attributes}">
- <WIZIF LCase(Trim(AttrName)) NEQ 'dn'>
- <WIZSET AttributesWithoutDN = AttributesWithoutDN & Trim(AttrName) & ','>
- </WIZIF>
- </WIZLOOP>
-
- <WIZIF AttributesWithoutDN NEQ ''>
- <WIZSET AttributesWithoutDN = Left( AttributesWithoutDN, Len(AttributesWithoutDN) - 1 )>
- </WIZIF>
-
- <!--- list of all attributes (excluding DN) --->
- <CFSET Attributes = '$${AttributesWithoutDN}'>
-
-
- <!--- if parameter DN has been passed - EDIT ENTRY --->
- <CFIF ParameterExists( URL.dn )>
- <CFLDAP NAME="GetRecord"
- SERVER="$${ServerName}"
- PORT="$${ServerPort}"
- USERNAME="$${Username}"
- PASSWORD="$${Password}"
- ACTION="query"
- START="#URL.dn#"
- SCOPE="base"
- ATTRIBUTES="#Attributes#"
- TIMEOUT="$${Timeout}"
- MAXROWS="1"
- >
-
- <WIZLOOP index="AttrName" list="$${AttributesWithoutDN}">
- <CFSET $${AttrName}_FormValue = HTMLEditFormat(GetRecord.$${AttrName})>
- </WIZLOOP>
- <!--- ... else parameter DN has not been passed - ADD ENTRY --->
- <CFELSE>
-
- <WIZLOOP index="AttrName" list="$${AttributesWithoutDN}">
- <CFSET $${AttrName}_FormValue = ''>
- </WIZLOOP>
- </CFIF>
-
- <HTML><HEAD>
- <TITLE>$${ApplicationName} - Edit Record</TITLE>
- </HEAD><BODY bgcolor="ffffff">
-
- <FONT size="+1">$${ApplicationName}</FONT> <BR>
- <FONT size="+2"><B>Edit Record</B></FONT>
-
-
- <FORM action="$${SafeApplicationName}_LdapAction.cfm" method="post">
-
- <INPUT type="hidden" name="Attributes" value="<CFOUTPUT>#Attributes#</CFOUTPUT>">
- <CFIF ParameterExists(URL.dn)>
- <INPUT type="hidden" name="dn" value="<CFOUTPUT>#URL.dn#</CFOUTPUT>">
- </CFIF>
-
- <TABLE>
- <CFOUTPUT>
- <WIZLOOP index="AttrName" list="$${AttributesWithoutDN}">
- <TR><TD>$${AttrName}</TD>
- <TD><INPUT type="text" name="$${AttrName}" value="#$${AttrName}_FormValue#" size=20>
- <INPUT type="hidden" name="$${AttrName}_required" value="You cannot leave the '$${AttrName}' field blank." >
- </TD>
- </TR>
- </WIZLOOP>
- </CFOUTPUT>
- </TABLE>
-
- <INPUT type="submit" name="btnEdit_OK" value=" OK ">
- <INPUT type="submit" name="btnEdit_Cancel" value="Cancel">
-
- </FORM>
-
- </BODY></HTML>